# -*- coding: UTF-8 -*-

"""
# Filename: prime_number.py
# author by:  Sylvanas Windrunner
"""


# 输出指定范围内的素数
while True:
    try:
        prime_list = []
        lower = int(input('输入区间的最小值：'))
        upper = int(input('输入区间的最大值: '))
        for num in range(lower, upper+1):
            if num > 1:
                for i in (2, num):
                    if (num % i) == 0:
                        break
                    else:
                        prime_list.append(num)
        print(prime_list)
    except ValueError as err:
        print(err)
        break
